//增加学员
let arr = []

function Abb() {
    let m = prompt('输入要添加学员的数量')
    if (isNaN(m)) {
        return alert('请输入数字')
    }
    m = parseInt(m)
    for (let i = 0; i < m;) {
        let name = prompt(`输入新增第${i+1}个学员的名字`)
        name = name.trim()
        if (!isNaN(name)) {
            alert('名字不能为数字')
            continue
        }
        if (!name) {
            alert('名字不能为空')
            continue
        }
        arr.push(name)

        console.log(`${arr}`)
        i++
    }

}



function show() {
    let len = arr.length
    for (let i = 0; i < len; i++) {
        let item = arr[i]
        document.write(`${item} &nbsp;&nbsp;`)
    }
}